﻿<Page
    x:Class="HAP.Win.MyFiles.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:HAP.Win.MyFiles"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" Loaded="Page_Loaded">
    <Grid Style="{StaticResource LayoutRootStyle}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="140"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <ProgressBar Name="loading" Background="Transparent" IsIndeterminate="False" />
        <!-- Back button and page title -->
        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Button x:Name="backButton" IsEnabled="False" Style="{StaticResource BackButtonStyle}"/>
            <TextBlock x:Name="pageTitle" Grid.Column="1" Text="Home Access Plus+ - My Files" Style="{StaticResource PageHeaderTextStyle}"/>
        </Grid>

        <StackPanel Grid.Row="2" HorizontalAlignment="Left" Margin="125,31,0,0" VerticalAlignment="Top" Width="800" >
            <TextBlock HorizontalAlignment="Left" Margin="0,0,0,40" VerticalAlignment="Top" TextWrapping="Wrap" Text="Please to connect you to your School's Home Access Plus+ Install"  Style="{StaticResource PageSubheaderTextStyle}" />
            <TextBlock Text="HAP+ Site:" FontSize="16" Padding="0,6" />
            <StackPanel Orientation="Horizontal">
                <ComboBox Width="600" Name="sites" SelectedIndex="0" SelectionChanged="sites_SelectionChanged">
                    <ComboBoxItem Content="New Site+" IsSelected="True"/>
                </ComboBox>
                <Button Content="Remove" Name="removesite" Visibility="Collapsed" Click="removesite_Click" />
                <Button Content="Help" Name="help" Click="help_Click" />
            </StackPanel>
            <TextBlock TextWrapping="Wrap" Text="HAP+ Address:" FontSize="16" Padding="0,6"/>
            <TextBox Name="address" Text="https://" InputScope="Url" />
            <TextBlock TextWrapping="Wrap" Text="Username:" FontSize="16" Padding="0,6" />
            <TextBox Name="username" Margin="0,0,200,0"/>
            <TextBlock TextWrapping="Wrap" Text="Password:" FontSize="16" Padding="0,6"/>
            <PasswordBox Name="password" Margin="0,0,200,0" IsPasswordRevealButtonEnabled="True"  />
            <Button Content="Login" Name="login" HorizontalAlignment="Left"  Margin="0,40,0,0" VerticalAlignment="Top" Height="60" Width="200" FontSize="20" Click="Button_Click"/>
        </StackPanel>
        <VisualStateManager.VisualStateGroups>

            <!-- Visual states reflect the application's view state -->
            <VisualStateGroup x:Name="ApplicationViewStates">
                <VisualState x:Name="FullScreenLandscape"/>
                <VisualState x:Name="Filled"/>

                <!-- The entire page respects the narrower 100-pixel margin convention for portrait -->
                <VisualState x:Name="FullScreenPortrait">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" 
                                                       Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" 
                                                    Value="{StaticResource PortraitBackButtonStyle}"/>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>

                <!-- The back button and title have different styles when snapped -->
                <VisualState x:Name="Snapped">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" 
                                                       Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" 
                                                    Value="{StaticResource SnappedBackButtonStyle}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="pageTitle" 
                                                       Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" 
                                                    Value="{StaticResource SnappedPageHeaderTextStyle}"/>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
    </Grid>
</Page>
